package cn.tedu.medicalmanagementsystem.user.service.impl;

import cn.tedu.medicalmanagementsystem.user.mapper.UserEscortMapper;
import cn.tedu.medicalmanagementsystem.user.pojo.vo.UserEscortVO;
import cn.tedu.medicalmanagementsystem.user.service.UserEscortService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserEscortServiceImpl implements UserEscortService {
    @Autowired
    private UserEscortMapper userEscortMapper;

    @Override
    public List<UserEscortVO> searchEscorts(String keyword, Integer page, Integer size) {
        int offset = (page - 1) * size;
        return userEscortMapper.findEscortsByKeyword(keyword, offset, size);
    }
}
